import {buildApiRequest as A,getApiUrl as G} from '../utils/request'

export default {
    //测试接口
    test: (p,c) => A(p, 'test', 'get', c),

    //登录验证接口
    login: (p,c) => A(p, 'auth/login', 'post', c),

    //退出登录接口
    logout: (p,c) => A(p, 'auth/logout', 'post', c),

    //获取用户信息
    getUser: (p,c) => A(p, 'auth/getUser', 'post', c),

    //获取角色列表
    getRole: (p,c) => A(p, 'auth/role', 'get', c),

    //获取得所有角色选择列表
    getRoleList: (p,c) => A(p, 'auth/role_list', 'get', c),

    //添加角色
    addRole: (p,c) => A(p, 'auth/role', 'post', c),

    //修改角色
    updateRole: (p,c) => A(p, 'auth/role/' + p.id, 'put', c),

    //删除角色
    deleteRole: (p,c) => A(p, 'auth/role/' + p.id, 'delete', c),

    //获取用户列表
    getUserList: (p,c) => A(p, 'auth/user', 'get', c),

    //添加用户
    addUser: (p,c) => A(p, 'auth/user', 'post', c),

    //修改用户
    updateUser: (p,c) => A(p, 'auth/user/' + p.id, 'put', c),

    //删除用户
    deleteUser: (p,c) => A(p, 'auth/user/' + p.id, 'delete', c)
}


